package com.chixing.controller;


import com.chixing.service.IUserMessageService;
import com.chixing.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 * 用户消息关系表（含消息推送状态） 前端控制器
 * </p>
 *
 * @author smith
 * @since 2025-10-28
 */
@RestController
@RequestMapping("/user-message")
public class UserMessageController {
    @Autowired
    private IUserMessageService userMessageService;

    @GetMapping("getAllMsg/{userId}")
    public Result getByUserId(@PathVariable("userId") Long userId){
        return userMessageService.getByUserId(userId);
    }

    @PutMapping("updateMsgStatus/{id}")
    public Result updateMsgStatus(@PathVariable("id") Long id){
        return userMessageService.updateMsgStatus(id);
    }

}
